package mysql

import "gorm.io/gorm"

//订单

type Order struct {
	gorm.Model
	UserId  int64  `gorm:"type:int(11);not null;comment: 用户id"`
	OrderSn string `gorm:"type:varchar(36);not null;comment: 订单号"`
	Amount  int64  `gorm:"type:int(11);not null;comment: 用户金额"`
	Status  int64  `gorm:"type:int(11);not null;comment: 用户状态"`
	PayTime int64  `gorm:"type:int(11);not null;comment: 支付时间"`
	Payment string `gorm:"type:varchar(20);not null;comment: 支付方式"`
}

//创建订单

func (shop *Order) CreateOrder() error {
	return Db.Create(&shop).Error
}
